from prefect_test import my_script_flow  # 从你的flow文件导入flow函数

if __name__ == "__main__":
    # 创建并应用部署
    deployment_id = my_script_flow.serve(
        name="my-flow-deployment-example",  # 部署名称
        parameters={"name": "Bob", "city": "Paris"},  # 默认参数
        # interval=300,  # 每300秒运行一次（可选）
        # cron="0 0 * * *",  # 每天午夜运行（可选，与interval二选一）
        # tags=["tutorial", "demo"],  # 添加标签（可选）
    )
    
    print(f"Deployment created successfully with ID: {deployment_id}")
